package model.sales;
// Generated Feb 14, 2013 10:33:00 PM by Hibernate Tools 3.2.1.GA


import java.math.BigDecimal;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import model.inventory.Item;

/**
 * TrsSalesDetail generated by hbm2java
 */
@Entity
@Table(name="trs_sales_detail", schema="sales")
public class SalesDetail  implements java.io.Serializable {

     private SalesDetailId id;
     private SalesMst salesMst;
     private Item item;
     private int seq;
     private BigDecimal qty;
     private BigDecimal hpp;
     private BigDecimal price;
     private BigDecimal diskon;
     private BigDecimal ppn;
     private BigDecimal amount;
     private Integer fraksi;

    public SalesDetail() {
    }
   
    @EmbeddedId
    @AttributeOverrides( {
        @AttributeOverride(name="id", column=@Column(name="id", nullable=false) ), 
        @AttributeOverride(name="itemId", column=@Column(name="item_id", nullable=false) ) } )
    public SalesDetailId getId() {
        return this.id;
    }
    
    public void setId(SalesDetailId id) {
        this.id = id;
    }
    
    @ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="id", nullable=false, insertable=false, updatable=false)
    public SalesMst getSalesMst() {
        return this.salesMst;
    }
    
    public void setSalesMst(SalesMst salesMst) {
        this.salesMst = salesMst;
    }

    @ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="item_id", nullable=false, insertable=false, updatable=false)
    public Item getItem() {
        return item;
    }

    public void setItem(Item item) {
        this.item = item;
    }
        
    @Column(name="seq", nullable=false)
    public int getSeq() {
        return this.seq;
    }
    
    public void setSeq(int seq) {
        this.seq = seq;
    }
    
    @Column(name="qty", precision=13)
    public BigDecimal getQty() {
        return this.qty;
    }
    
    public void setQty(BigDecimal qty) {
        this.qty = qty;
    }
    
    @Column(name="hpp", precision=13)
    public BigDecimal getHpp() {
        return this.hpp;
    }
    
    public void setHpp(BigDecimal hpp) {
        this.hpp = hpp;
    }
    
    @Column(name="price", precision=13)
    public BigDecimal getPrice() {
        return this.price;
    }
    
    public void setPrice(BigDecimal price) {
        this.price = price;
    }
    
    @Column(name="diskon", precision=13, scale=3)
    public BigDecimal getDiskon() {
        return this.diskon;
    }
    
    public void setDiskon(BigDecimal diskon) {
        this.diskon = diskon;
    }
    
    @Column(name="ppn", precision=13)
    public BigDecimal getPpn() {
        return this.ppn;
    }
    
    public void setPpn(BigDecimal ppn) {
        this.ppn = ppn;
    }
    
    @Column(name="amount", precision=13)
    public BigDecimal getAmount() {
        return this.amount;
    }
    
    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }
    
    @Column(name="fraksi")
    public Integer getFraksi() {
        return this.fraksi;
    }
    
    public void setFraksi(Integer fraksi) {
        this.fraksi = fraksi;
    }




}


